home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / UTILENUS / JOBS32A2.LZH / SMENU.JMT < prev   
INI File  |  1987-11-01  |  4KB  |  124 lines

  1. [* SMENU.JMT -   This file defines a simple menu that may be easily
  2.                  customized or adapted for your needs.  It is provided
  3.                  as an example of macro programming.
  4.  
  5.  
  6.     Only 3 sample commands have been implemented in this menu.  To change
  7.     or add new entries, do the following:
  8.  
  9.     1.  Type the entry name next to the appropriate function key
  10.         label in the menu display window.
  11.  
  12.     2.  Add the function key to the legal keystroke list, if its not
  13.         already there.
  14.  
  15.     3.  Define a macro (either with your editor or in Learn Mode) to
  16.         perform the new task.  Assign this macro to its function key
  17.         in the SAMPMENU.JM file.
  18.  
  19.     You can easily make as many of these menus as you need by copying the
  20.     the macro file SAMPMENU to a new file and redefining its macros.
  21.  
  22.     This very simple menu arrangment is entered by running the macro
  23.     named GO-SMENU that is in the default macro file JMAC-SW.JM.  After
  24.     exiting the menu, the current macro file is automatically changed back
  25.     to the default file by the auto macro named GODEFMAC.
  26.  
  27.     Note:   The macro commands are in uppercase and the comments in
  28.             lowercase for clarity.  The macro language is not case
  29.             sensitive, so you may use whatever convention pleases you.
  30.  
  31.             Tabs have been removed for distribution, but may be used
  32.             freely when creating JMT files.  (except within window
  33.             definitions).
  34. *]
  35.  
  36. [MACRO][SMENU]
  37. [START][GLOBAL]
  38.  
  39. [CALL]["GOTOTREE"]              [* make sure we begin at a tree screen *]
  40.  
  41. ~S[OFF]                         [* turn screen off, JOBS' display is not *]
  42.                                 [* needed for now *]
  43.  
  44. [* begin menu display - draw full screen background for menu *]
  45.  
  46. [WIND][BORDER][CLEAR]1,0,0,1,1,80,25
  47.  
  48.  
  49.                                  ~HSAMPLE MENU~H
  50.  
  51.  
  52.                        F1
  53.                        F2     RUN CHKDSK     
  54.                        F3
  55.                        F4     FORMAT DRIVE A:
  56.                        F5     
  57.                        F6     FORMAT DRIVE B:
  58.                        F7     
  59.                        F8     
  60.                        F9     
  61.                        F10    
  62.  
  63.  
  64.  
  65.                Press function key to the left of desired choice.
  66.  
  67.                  Press <Esc> to cancel menu and return to JOBS.
  68. [ENDWIND]
  69.  
  70. [* draw a box around the menu *]
  71. [WIND][BORDER]1,0,0,22,6,59,17
  72. [ENDWIND]
  73.  
  74. [* add a vertical line to separate function keys from descriptions *]
  75. [WIND]1,0,0,29,6,29,17
  76. [ENDWIND]
  77.  
  78. [* add a label in the upper left-hand corner *]
  79. [WIND]1,0,0,3,1,21,1
  80.  MENU: SAMPLE ═══════
  81. [ENDWIND]
  82.  
  83.                                     [* limit allowable keystrokes *]
  84. [LEGAL]
  85. [F-2][F-4][F-6][ESC]
  86. [ENDLEGAL]
  87.  
  88. ~H[OFF]                             [* disable JOBS' help key so *]
  89.                                     [* menu can use it *]
  90.  
  91. [ASK][SELECT]                       [* ask for user's choice.  won't *]
  92.                                     [* return if a legal macro key is *]
  93.                                     [* selected *]
  94.  
  95. [* user must have pressed <Esc>, clean up and exit *]
  96.  
  97. [ILLEGAL][ENDLEGAL]                 [* make all keys legal again *]
  98.  
  99.                                     [* clear the screen *]
  100. [WIND][CLEAR]1,0,0,1,1,80,25
  101. [ENDWIND]
  102.  
  103. ~S[ON]                              [* turn screen back on.  Notice *]
  104.                                     [* that macro windows display even *]
  105.                                     [* if the screen is turned off *]
  106.  
  107. /                                   [* redraw screen before exit *]
  108.  
  109. [$MACFILE = "JMAC-SW"]              [* change to default macro file *]
  110.  
  111. [EXIT]                              [* exit macro *]
  112.